home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / layoutc.exe / LAYOUT.DOC < prev    next >
Text File  |  1992-01-27  |  6KB  |  171 lines

  1.                   Layout
  2.                Version 1.0
  3.                Copyright (c) 1991
  4.              Lincoln Beach Software
  5.  
  6. What Is Layout?
  7.  
  8. LAYOUT is a program that will read any ASCII report layout generated by an
  9. editor or word processor that will automatically generate the 'C' source code
  10. necessary to recreate the desired report layout.
  11.  
  12.  
  13. What You Should Have Received?
  14.  
  15. There were five files that should have been include with this package.  They
  16. are: 
  17.  
  18.      LAYOUT.COM - The code generator.
  19.      SAMPLE.RPT - Example of a report layout.
  20.      SAMPLE.C   - Code generated from SAMPLE.RPT.
  21.      REPORT.C   - Program with code incorporated from SAMPLE.C.
  22.      LAYOUT.DOC - This documentation.
  23.  
  24.  
  25. Guidelines:
  26.  
  27. There are only a few guidelines to follow when creating your report layout. 
  28. When creating placeholders in a line you must start them with a %, just like
  29. the printf() function.  The '%' sign counts as the first character in the
  30. string.  This means that if you want to reserve a space of 10 characters you
  31. would have a percent sign followed by 9 s's and at the end of the line you
  32. will put the variable that would fit into the placeholder.  Before typing in
  33. the variable names you must start it with the pipe '|' symbol.  This key is
  34. over the backslash on most keyboards.  This would look like:               
  35.  
  36.       This is my string    %sssssssss   |my_string 
  37.  
  38. and would create the line of code:
  39.       
  40.       fprintf(stdprn,"This is my string    %-10s   \n\r",my_string);
  41.  
  42. If there were any spaces between the last 's' and the '|' then they would be
  43. included in quotes as shown.
  44.  
  45. There are five different types of placeholders.  They are:
  46.  
  47.       c - character field
  48.       s - strings
  49.       d - integers
  50.       x - hex numbers
  51.       f - floating point numbers
  52.  
  53. You can use the percent sign in your report but if it is followed by any of
  54. these letters it will create a placeholder for a variable.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Error Checking:
  62.  
  63. Some error checking has been built into this system.  It will keep track of
  64. how many placeholders and how many variables are in each line, if any, and
  65. report and discrepancies during the conversion.
  66.  
  67.  
  68. Some Defaults:
  69.  
  70. All string fields are left justified with the '-' directly after the percent
  71. sign.  Also all code is written as if to be sent to the standard printer set
  72. up by DOS, hence the stdprn command.  All tabs are also treated as 8 spaces.
  73.  
  74.  
  75. Warnings:
  76.  
  77. The last line in the report layout must be terminated with a new line
  78. character or the last ');' will not be include in the code.
  79. When you use single characters they will take up two spaces on the layout
  80. but in actuality they really only take up one space.  You will have to
  81. adjust your layout accordingly.
  82.  
  83. Help:
  84.  
  85. Study the file SAMPLE.RPT and this will show you how to set up your layout.
  86.  
  87.  
  88. Creating Your First Layout:
  89.  
  90. After you design your layout save it as an ASCII file.  Exit your editor or
  91. word processor and run LAYOUT.  You will need to enter in the layout file
  92. name and the filename you wish the code to be generated into.  Such As:
  93.  
  94.       LAYOUT SAMPLE.RPT SAMPLE.C
  95.  
  96. You then can import the file SAMPLE.C into your own source code and do with
  97. it what you wish.
  98.  
  99.  
  100. COPYRIGHT & SHAREWARE NOTICE
  101.  
  102. The software contained in this package is Shareware.  This means that
  103. you have a period of time to try it and after that period if you wish
  104. to continue to use it, you must register your use by filling out the
  105. registration form and mailing it and the registration fee to Lincoln
  106. Beach Software.  This software and documentation is protected under the
  107. United States Copyright Laws.  This product may be distributed and copied
  108. freely, provided there is no charge for the use of this package.  The
  109. only charge may be for distribution and copying services.  Your support
  110. of Shareware is appreciated.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.                 LAYOUT  V1.0 
  122.               REGISTRATION FORM
  123.  
  124. Please answer the registration questionnaire below and return this form with
  125. your cash, check or money order to :
  126.  
  127.             Lincoln Beach Software
  128.             P.O. Box 1554 
  129.             Ballwin, MO 63022 
  130.             Phone: (314) 227-2431 
  131.  
  132.  
  133.  Firm __________________________________________________________________
  134.  
  135.  Address _______________________________________________________________ 
  136.  
  137.      _______________________________________________________________ 
  138.  
  139.      _______________________________________________________________ 
  140.  
  141.      _______________________________________________________________ 
  142.  
  143.  Phone (_____)_____-______  Occupation _________________________________ 
  144.  
  145.  Type of computer(s) you own ___________________________________________ 
  146.  
  147.  DOS version  _____ 
  148.  
  149.  Where did you get LAYOUT from: 
  150.  
  151.     BBS Name ________________________________ Number (_____)_____-______ 
  152.  
  153.     Other ______________________________________________________________ 
  154.  
  155.  
  156. ____ LAYOUT Registration .................   $ 10.00 ea  $ _______ 
  157.      (Includes latest version of program diskette) 
  158.  
  159. ____ INSTALL-IT Registration..............   $ 35.00 ea  $ _______
  160.      Customizable Installation Program
  161.      for developers.
  162.       
  163.      Non-US Shipping........................ $  5.00 ea  $ _______ 
  164.      (Payments must be in US Dollars, US bank) 
  165.  
  166.  TOTAL Enclosed ........................................ $ _______ 
  167.  
  168.  Non-U.S. orders need to include $5.00 extra to cover additional
  169.  shipping and handling charges.  Checks and money orders must be
  170.  drawn on a U.S. bank.  Please send all payments payable in U.S. Dollars.
  171.